package locations.actions;

import java.util.ArrayList;
import java.util.List;

import locations.dao.DAOFactory;
import locations.dao.InstitutionResponsibleDAO;
import locations.model.InstitutionResponsible;

import com.opensymphony.xwork2.ActionSupport;

public class InstitutionResponsibleIndexAction extends ActionSupport {

	
	private String pageTitle = "Listado de Pacientes";
	private List<InstitutionResponsible> institutionResponsibles = new ArrayList();
	
	public String execute() throws Exception {
		
		InstitutionResponsibleDAO dao = DAOFactory.getInstitutionResponsibleDAO();
		this.setInstitutionResponsibles(dao.retrieveAll());
		return SUCCESS;
	}

	public String getPageTitle() {
		return pageTitle;
	}

	public void setPageTitle(String pageTitle) {
		this.pageTitle = pageTitle;
	}

	public List<InstitutionResponsible> getInstitutionResponsibles() {
		return institutionResponsibles;
	}

	public void setInstitutionResponsibles(
			List<InstitutionResponsible> institutionResponsibles) {
		this.institutionResponsibles = institutionResponsibles;
	}


	
	
	
}
